<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../react18/react.development.js"></script>
    <script src="../react18/react-dom.development.js"></script>
    <!-- <script src="../react18/babel.min.js"></script> -->
    <style>
        .box1{
            width: 250px;
            height: 100px;
            background-color: pink;
        }
    </style>
</head>
<body>
    <div id="add"></div>

    <!-- JSX创建虚拟DOM
    <script type="text/babel">
        //创建虚拟DOM
        const vDOM = (
            <div class="box1">
                <h1>jsx</h1>
                <p>可以用来创建虚拟DOM</p>
            </div> 
        )
         //创建一个容器并渲染
         ReactDOM.createRoot(document.getElementById("add")).render(vDOM)
    </script> -->

    <script>
        const vDOM = React.createElement("div",{className:"box1"},"React是个了不起的库")
        ReactDOM.createRoot(document.getElementById('add')).render(vDOM)
    </script>
</body>
</html>